<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<style type="text/css">
	.even{
		background-color:gray
	}
	.block{
	float:left;
	display: inline
	}
	#idstyle{
		border: solid 1px black
	}
	
</style>
<body>
		<ul style="align:center">
		<h3>欢迎${sessionScope.uname}登录</h3>
		<a href="logout">退出登录</a>
		<c:forEach items="${books}" var="b" varStatus="s">
		<li>
		<div class="block">
			<div>
				<img src="<c:url value='/images/${b.image }'/>" border="0"/>
			</div>
			<div>
					<span>${b.bname}</span>
					<span>
					<fmt:formatNumber value="${b.price }" pattern="￥##,###.00"></fmt:formatNumber>
					</span>
			</div>
			<div><a href="addCart?bid=${b.bid}" >加入购物车</a></div>
			</div>
			</li>
		</c:forEach>
		</ul>
		
		<a href="showCart">查看购物车</a>
</body>
</html>